This section describes the functions that allow your application to gather information about the Image Compression Manager and the installed compressor components.
You can use the CodecManagerVersion function to retrieve the version number associated with the Image Compression Manager that is installed on a particular computer.
You can use the FindCodec , GetCodecInfo , and GetCodecNameList functions to locate and retrieve information about the compressor components that are available on a computer.
Your application can determine the version of the installed Image Compression Manager by calling the CodecManagerVersion function.
pascal OSErr CodecManagerVersion (long *version);
The CodecManagerVersion function returns the version information as a long integer value.
"Getting Information About Compressors and Compressed Data," which begins on Getting Information About Compressors and Compressed Data , describes how to use CodecManagerVersion .
The GetCodecNameList function allows your application to retrieve a list of installed compressor components or a list of installed compressor types. This information may be useful when the user selects a compression type for a given image or sequence.
pascal OSErr GetCodecNameList (CodecNameSpecListPtr *list,
short showAll);
The Image Compression Manager returns this information in a compressor name list structure, which contains an array of compressor name structures and a field indicating the number of structures in the array.
The CodecType data type defines a field in the compressor name list structure that identifies the compression method employed by a given compressor component. Apple Computer's Developer Technical Support group assigns these values so that they remain unique. These values correspond, in turn, to text strings that can identify the compression method to the user.
typedef long CodecType;
/* compressor type descriptor--for example 'jpeg','rle ',
'rpza' */
Currently, six CodecType values are provided by Apple. You should use the GetCodecNameList function to retrieve these names, so that your application can take advantage of new compressor types that may be added in the future. For each CodecType value in the following list, the corresponding compression method is also identified by its text string name. For more information about each of these compression techniques, see the section "About Image Compression," which begins on About Image Compression .
'rpza
'
|
video compressor
|
'jpeg'
|
photo compressor
|
'rle '
|
animation compressor
|
'raw '
|
raw compressor
|
'smc '
|
graphics compressor
|
'cvid'
|
compact video
compressor
(cinepak)
|
The DisposeCodecNameList function allows your application to dispose of the compressor name list structure you obtained by calling the GetCodecNameList function.
pascal OSErr DisposeCodecNameList (CodecNameSpecListPtr list);
The GetCodecInfo function returns information about a single compressor component.
pascal OSErr GetCodecInfo (CodecInfo *info, CodecType cType,
CodecComponent codec);
Your application may retrieve information about a specific compressor or about a compressor of a specific type. If you request information about a type of compressor, the Image Compression Manager returns information about the first compressor it finds of that type. The Image Compression Manager returns the detailed compressor information in a compressor information structure (see "The Compressor Information Structure," which begins on The Compressor Information Structure , for details).
The FindCodec function allows you to determine which of the installed compressors or decompressors has been chosen to field requests made using one of the special compressor identifiers.
Some Image Compression Manager functions allow you to specify a particular compressor component. For example, you may use the codec parameter to the CompressSequenceBegin function (described on CompressSequenceBegin ) to specify a particular compressor to do the compression.
You identify the compressor to the Image Compression Manager by specifying the compressor's component identifier (see the description of the GetCodecNameList function on GetCodecNameList for information on retrieving these identifiers).
The Image Compression Manager also supports several special identifiers that allow you to exert some control over the component for a given action without having to know its identifier.
pascal OSErr FindCodec (CodecType cType, CodecComponent specCodec,
CompressorComponent *compressor,
DecompressorComponent *decompressor);